<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
    <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><spring:message code="role_setting"/></title>
    <%@ include file="/WEB-INF/views/include/head.jsp"%> 
    <script src="${ctxStatic}/js/style.js"></script>
    <script src="${ctxStatic}/js/jquery-1.9.1.min.js"></script>
    <link rel="stylesheet" href="${ctxStatic}/css/list.css">
        <script type="text/javascript">
        
        
        function searchListForm() {
    		
    		var roleName = $("#roleName").val();
    		$("#activity_pane").showLoading();
    		$.post("${ctx}/database/role/searchList?roleName=" + roleName, "",
    				function(result) {
    					var listHtml = result["role"];
    					var pageHtml = result["page"];
    					$("#listHtml").html(listHtml);
    					$("#paging").html(pageHtml);
    					$("#activity_pane").hideLoading();
    				}, 'json');
    	}
        //重置
           function clean(){
               // input 赋值空
               $("input").val("");
               // 提交表单
               searchListForm();
           }
        </script> 
    </head>
    <body>
       <form  id="searchForm" >
       <div class="listArea" id="activity_pane">
		<div class="listBg">
            <div class="searchArea clearfix">
            <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
            <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                <div class="searchLeft clearfix">
                    
                        <!-- 角色名称 -->
                        <div class="searchInp clearfix">
                        <p class="tit"><spring:message code="role_name"/></p>
                            <input  id="roleName"  name="roleName"   value="${role.roleName}" >
                        </div>
                    
        <%--             <div class="searchSm clearfix">
                    <!-- 角色授权 -->
                        <p class="searchTxt"><spring:message code="role_accredit"/></p>
                        <div class="searchInp">
                            <input >
                        </div>
                    </div> --%>
                </div>
                <div class="searchRight clearfix">
                    <!-- 查询 -->
                    <button type="button" class="btn-js" onclick="searchListForm();"><spring:message code="commom_check"/></button>
                    <!-- 重置 -->
                    <button type="button" class="btn-js" onclick="clean();"><spring:message code="role_reset"/></button>
                    <shiro:hasPermission name="database:role:edit">
                    <!-- 新建 -->
                        <button type="button" class="btn-cj" onclick="popup('1000px','650px','${ctx}/database/role/form')"><spring:message code="role_create"/></button>
                    </shiro:hasPermission>
                </div>
            </div>
       
        <div class="tableArea">
				<div class="" style="overflow: auto;width: 1293px;padding-top: 36px;height: 714px; ">
                <table cellpadding="0" class="tableHead">
                    <thead>
                        <tr>
                            <!-- 序号No. -->
                            <th class="table-No"><spring:message code="common_no"/></th>
                            <!-- 角色名称 -->
                            <th class="table-zwmc"><spring:message code="role_name"/></th>
                            <!-- 数据范围 -->
                            <th class="table-zwms"><spring:message code="role_dataField"/></th>
                            <!-- 系统数据 -->
                            <th class="table-zwzt"><spring:message code="role_sysData"/></th>
                            <!-- 角色授权 -->
                            <%-- <th class=""><spring:message code="role_accredit"/></th> --%>
                            <!-- 创建人 -->
                            <th class="table-zwcjz"><spring:message code="role_creater"/></th>
                            <!-- 创建日期 -->
                            <th class="table-zwcjrq"><spring:message code="role_createDate"/></th>
                        </tr>
                    </thead>
                    <table cellpadding="0" class="tableBody">
                    
                        <tbody id="listHtml">
                           
                        </tbody>
                    
                    </table>
                </table>
                
            </div>
            </div>
            </div>
            <div id="paging"></div>
        </div>
         </form>
        <script>
        $(document).ready(function() {		
			searchListForm();
		});
        </script>
    </body>
</html>